//
//  UIAlertController+YCTools.h
//  Pods
//
//  Created by Apple on 2022/11/5.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


@interface UIAlertActionConfig : NSObject

@property (nonatomic, copy)   NSString *text;
@property (nonatomic, strong) UIFont *font;
@property (nonatomic, strong) UIColor *color;
@property (nonatomic, readonly) UIColor *defaultColor;
@property (nonatomic, readonly) UIFont *defaultFont;

+ (instancetype)configWithText:(NSString *)text font:(UIFont *)font color:(UIColor *)color;
+ (instancetype)configWithText:(NSString *)text color:(UIColor *)color;
+ (instancetype)configWithText:(NSString *)text;

@end


@interface NSString (UIAlertActionConfig_Ext)

- (UIAlertActionConfig *)alertConfigWithColor:(UIColor *)color;
- (UIAlertActionConfig *)alertConfigWithFont:(UIFont *)font color:(UIColor *)color;

@end



@interface UIAlertAction (CustomConfig)

@property (nonatomic,strong) UIFont *fc_tempFont;
@property (nonatomic,strong) UIFont *fc_font;
@property (nonatomic,strong) UIView *fc_cusView;

- (void)updateFont;

@end



@interface UIAlertController (YCTools)

+ (instancetype)alertWithTitle:(id)title
                       message:(id)message
                 fieldSettings:(void(^)(UITextField *textField))fieldSettings
                        cancel:(id)cancel
                        others:(NSArray *)others
                        action:(void (^)(NSInteger index, NSString *title, NSString *text))action;

+ (instancetype)alertWithTitle:(id)title
                       message:(id)message
                        cancel:(id)cancel
                        others:(NSArray *)others
                        action:(void (^)(NSInteger index, NSString *title))action;

+ (instancetype)sheetWithTitle:(id)title
                       message:(id)message
                        cancel:(id)cancel
                        others:(NSArray *)others
                        action:(void (^)(NSInteger index, NSString *title))action;

@end

NS_ASSUME_NONNULL_END
